package com.dili.dd.gpi.enums;

/**
 * 位置标注的级别
 * User: zhaoYuan
 * Date: 14-9-9
 * Time: 下午5:08
 */
public enum APPType implements BaseEnumInterface {

    WEB(1,"系统"),ANDROID(2,"ANDROID应用"),IOS(3,"IOS应用");
    private int val;

    private String desc;


    APPType(int val, String desc) {
        this.val = val;
        this.desc = desc;
    }

    public int getValue() {
        return val;
    }

    public APPType getSub(){
        int subVal = this.val + 1;
        return getByValue(subVal);

    }

    public String getDesc() {
        return desc;
    }

    public static APPType getByValue(int val){
        APPType[] values = APPType.values();
        for (APPType GPIType : values) {
            if(GPIType.getValue() == val){
                return GPIType;
            }
        }
        throw new RuntimeException("值为" + val + "的枚举值，在" + APPType.class + "中不存在");
    }

}
